let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n178,
                    i =
                    (this && this.__extends) ||
                    ((_n178 = function n(t, e) {
                            return (_n178 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n178(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.UIMoneyEffect = void 0);
                var r = t('UIComponent'),
                    a = t('ComUtils'),
                    s = t('MathUtils'),
                    c = t('TimeMrg'),
                    l = t('BattleMrg'),
                    u = (function(t) {
                        function e() {
                            var e = t.call(this, cc.Canvas.instance.node) || this,
                                o = e;
                            return (
                                cc.resources.load(
                                    'Prefab/Effect/UIMoneyEffect',
                                    function(t, e) {
                                        t || o.initEffect(cc.instantiate(e));
                                    }
                                ),
                                e
                            );
                        }
                        return (
                            i(e, t),
                            (e.show = function(t, o) {
                                o &&
                                    t &&
                                    (this.list.length ? this.list.shift() : new e()).showEffect(
                                        t,
                                        o
                                    );
                            }),
                            (e.put = function(t) {
                                this.list.push(t);
                            }),
                            (e.prototype.initEffect = function(t) {
                                (this._node = t),
                                (this._imgIcon = a.default.getComponent(
                                    cc.Sprite,
                                    t,
                                    'imgIcon'
                                )),
                                (this._msTrailing = a.default.getComponent(
                                    cc.MotionStreak,
                                    t,
                                    'msTrailing'
                                )),
                                (this._msTrailing.stroke = 10),
                                this.show();
                            }),
                            (e.prototype.showEffect = function(t, e) {
                                (this._moeny = t.value),
                                (this._startPt = this.view.convertToNodeSpaceAR(
                                    t.entity.convertToWorldSpaceAR(cc.Vec2.ZERO)
                                )),
                                (this._endPt = this.view.convertToNodeSpaceAR(
                                    e.convertToWorldSpaceAR(cc.Vec2.ZERO)
                                )),
                                this._node && this.show();
                            }),
                            (e.prototype.createPath = function() {
                                Math.random();
                                var t = cc.v2(
                                    this._startPt.x,
                                    this._startPt.y + 10 * s.default.randomInt(20, 30)
                                );
                                return s.default.bezier2([this._startPt, t, this._endPt], 20);
                            }),
                            (e.prototype.onShow = function() {
                                t.prototype.onShow.call(this),
                                    (this._speed = 100 * s.default.randomInt(8, 12)),
                                    (this._path = this.createPath()),
                                    this.next(),
                                    this.view.addChild(this._node),
                                    c.TimeMrg.timer.add(this.update, this);
                            }),
                            (e.prototype.next = function() {
                                var t = this._node;
                                if (
                                    (t.setPosition(this._path[0]),
                                        this._path.shift(),
                                        this._path.length > 0)
                                ) {
                                    var e = this._path[0];
                                    (this._radian = Math.atan2(e.y - t.y, e.x - t.x)),
                                    (this._distance = s.default.distance2(t.x, t.y, e.x, e.y));
                                } else this.complete();
                            }),
                            (e.prototype.onUpdate = function(e) {
                                t.prototype.onUpdate.call(this, e);
                                var o = e * this._speed;
                                (this._distance -= o),
                                this._distance > 0 ? this.updateLocation(o) : this.next(),
                                    (this._speed *= 1.02);
                            }),
                            (e.prototype.onClose = function() {
                                t.prototype.onClose.call(this),
                                    c.TimeMrg.timer.remove(this.update, this),
                                    (this._item = null),
                                    this._node && (this._node.parent = null),
                                    this._weapon &&
                                    (this._weapon.removeFromParent(!0), (this._weapon = null)),
                                    e.put(this);
                            }),
                            (e.prototype.updateLocation = function(t) {
                                var e = this._node,
                                    o = s.default.to(e.x, e.y, this._radian, t);
                                e.setPosition(o);
                            }),
                            (e.prototype.complete = function() {
                                (l.BattleMrg.ins.money += this._moeny), this.close();
                            }),
                            (e.list = []),
                            e
                        );
                    })(r.UIComponent);
                (o.UIMoneyEffect = u), console.log("end");
            module.exports =  e.exports;